package com.demo.service;

import com.demo.entity.User;
import com.demo.entity.UserRole;
import com.demo.vo.UserVo;

import java.util.List;

public interface IUserService {
     User queryUserByPhone(String phone);

    /**
     * 获取登录用户信息
     * @param user
     * @return
     */
     UserVo queryUserByPhoneOrUserName(User user);
    /**
     * 分页查询:关键字，手机号、字段升降序、每页显示大小，某一页
     * 默认进行每页15个显示
     *
     * @param user
     * @return
     */
     List<User> queryByPage(UserVo user);

    int queryCount(UserVo user);
    int queryCountByComId(UserVo user);
    int queryCountByDepId(UserVo user);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);
    int deleteByUserId(Integer userid);
    int addBatch(List<UserRole> list);
    /**
     * 通过用户ID 获取部门fax as dep_name,tel as com_name
     * @param record
     * @return
     */
    User selectDepByPrimaryKey(User record);

}
